package com.zwj.enums;

/**
 * 作业类型枚举
 */
public enum WorkTypeEnum {

    DAILY("0","日常作业"),
    STAGE("1","阶段性作业"),
    FINALLY("2","最终作业");

    private String key;
    private String value;

    WorkTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getEnumValue(String key) {
        WorkTypeEnum[]  workTypeEnums =  WorkTypeEnum.values();
        for (WorkTypeEnum workTypeEnum : workTypeEnums) {
            if (workTypeEnum.getKey().equals(key)) {
                return workTypeEnum.getValue();
            }
        }
        return null;
    }
    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
